﻿@model IEnumerable<JinianNet.JNCms.Models.Template>
<!DOCTYPE html>
<html>
<head>
    <title>模板管理 - @JinianNet.JNCms.Config.Site.Name</title>
    @JinianNet.Web.ResourceManager.Script.Render("Manage/Base")
    @JinianNet.Web.ResourceManager.Style.Render("Manage/Base")
</head>
<body>
    @{
        string themeUrl = JinianNet.Common.Url.Concat("/", JinianNet.JNCms.Config.Site.SiteDirectory, JinianNet.JNCms.Config.Site.TemplateDirectory);
        if (!themeUrl.EndsWith("/"))
        {
            themeUrl = themeUrl + "/";
        }
    }

    <table width="98%" align="center" border="0" cellspacing="0" cellpadding="0" class="grid">
        <tr>
            <th align="left">&nbsp;&nbsp;&nbsp;&nbsp;模板管理</th>
        </tr>
        <tr>
            <td>
                <div class="templets">
                    <ul>
                        @foreach (var item in Model)
                        {
                            <li>
                                <div>
                                    <img src="@themeUrl@item.Key/skin.gif" width="200" height="150" alt="@item.Title" />
                                </div>
                                <div class="center">@item.Title</div>
                                <div class="center">作者：@item.Author [<a href="@item.Url" target="_blank">访问</a>]</div>
                                <div class="center">
                                    @(new MvcHtmlString(JinianNet.JNCms.Config.Site.Theme.Equals(item.Key, StringComparison.OrdinalIgnoreCase) ? "<span class=\"red\">已应用</span>" : "<a href=\"应用\">"))
                                    <a href="#@item.ID">删除</a>
                                </div>
                            </li>
                        }
                    </ul>
                </div>
            </td>
        </tr>
        <tr>
            <td>@ViewData["WebPage"]</td>
        </tr>
    </table>
</body>
</html>
